package www.xpu.edu.app.job;

import android.content.Intent;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;

import www.xpu.edu.app.R;

public class Activity_job_4 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_job_4);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
        TextView text1=findViewById(R.id.job4_text1);
        TextView text2=findViewById(R.id.job4_text2);
        TextView text3=findViewById(R.id.job4_text3);
        TextView text4=findViewById(R.id.job4_text4);
        TextView text5=findViewById(R.id.job4_text5);
        TextView text6=findViewById(R.id.job4_text6);
        TextView text7=findViewById(R.id.job4_text7);
        TextView text8=findViewById(R.id.job4_text8);
        Button button1=findViewById(R.id.job4_button1);
        //Button button2=findViewById(R.id.job4_button2);
        Button button3=findViewById(R.id.title_back);
        Button button4=findViewById(R.id.title_change);


        TextView text=findViewById(R.id.title_text);
        text.setText("简历管理");
        ArrayList<String> data = getIntent().getStringArrayListExtra("data");
        text1.setText(data.get(0));
        text2.setText(data.get(1));
        text3.setText("我的优势:\n"+data.get(2));
        text4.setText("求职期望:\n"+data.get(3));
        text5.setText("实习经历:\n"+data.get(4));
        text6.setText("项目经历:\n"+data.get(5));
        text7.setText("教育经历:\n"+data.get(6));
        text8.setText("社交主页:\n"+data.get(7));
        //get(8)为学生的num
        //get(9)为id,发送邀约的时候需要用到
        //发送邀约
        final String num=data.get(9);
        final String id=data.get(10);
        System.out.println(num+"##"+id);
        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Activity_job_4.this,Activity_job5.class);
                intent.putExtra("data",num);
                intent.putExtra("id",id);
                startActivity(intent);
            }
        });
        //简历管理
        /*button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {


            }
        });*/
        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        button4.setVisibility(View.INVISIBLE);


    }
}
